package com.wikidot.designpatterns.memento;

/**
 * This class defines tuple of values that define 2D size. This class is the
 * used to represent state of the image.
 */
public class Dimension {
	private int width;

	private int height;

	/**
	 * Constructs Dimension object.
	 */
	public Dimension(int width, int height) {
		this.width = width;
		this.height = height;
	}

	/**
	 * Provides primitive values of the Dimension object.
	 * 
	 * @return Array of values in width, height order.
	 */
	public int[] getDimensHion() {
		return new int[] { width, height };
	}

	@Override
	public String toString() {
		return "[" + width + ", " + height + "]";
	}
}
